<?php
/*
 * @Author: 李志刚
 * @CopyRight: 2020-2030 衡水山木枝技术服务有限公司
 * @Date: 2021-07-05 17:53:39
 * @Description: 发货上的api
 * @LastEditors: 李志刚
 * @LastEditTime: 2021-09-17 17:00:31
 * @FilePath: /qingshanERP/routes/s-api.php
 */
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

// 管理中心API
Route::group(['prefix' => 's-api', 'namespace' => 'QingShanSupplier'], function () {
    // 登录
    Route::post('login', 'LoginController@postLogin');
});


Route::group(['prefix' => 's-api', 'namespace' =>'QingShanSupplier', 'middleware' => ['s-api']], function () {
    // 订单
    Route::group(['prefix' => 'order'], function () {
        Route::get('/pddlist', 'OrderPddController@getList');
        Route::post('/pddsupplier', 'OrderPddController@postSupplier');
        Route::post('/pddtrack', 'OrderPddController@postTrack');
        Route::post('/pddtrackm', 'OrderPddController@postTrackM');
        Route::post('/pddreissue', 'OrderPddController@reissueTrack');
        Route::post('/pddreissuenumber', 'OrderPddController@reissueTrackNumber');
        Route::post('/pddwaybill', 'OrderPddController@postWaybill');
        Route::post('/pddordertrack', 'OrderPddController@postOrderTrack');
    });
    // 物流公司
    Route::get('logistics/list', 'LogisticsController@getList');
    // 左侧菜单
    Route::get('menu/list', 'MenuController@getList');
    // 直接用正则控制所有错误请求到一个地址
    Route::pattern('path', '.+');
    Route::any('{path}', 'ResponseController@anyErrors');
});